<?php
namespace app\common\service\ability\service;
use app\common\service\ability\interfaces\AdminAbility;

use app\common\model\Admin;
//管理员拥有能力类
class AdminAbilityService implements AdminAbility{
    public function __construct(Admin $admin)
    {
        $this->models = $admin;
    }
    //获取管理员列表带分页
    public function getListPage($where){
        $page = getPageData();
        $orderStr = getOrderString();
        return $this->models->where($where)->limit($page['start'], $page['limit'])->order($orderStr.'admin_id desc')->select();
       
    }
    public function getCount($where){
        return $this->models->where($where)->count();
    }
    //保存管理员添加工作
    public function saveAdd($addData){
        return $this->models->create($addData);
    }
    public function getLine($where){}
    public function saveEdit($editData){}
    public function saveDel($delData){}
    public function login($loginData){}
    public function logout($loginData){}
    public function getInfo($where){}
    public function saveInfo($infoData){}
    public function resetPassword($passwordData){}
    public function checkToken($tokenData){}
    public function loginSuccess($rowData){}
    public function loginError($rowData){}
    public function createAdminAccount($accountData){}
    public function getAdminRoles($adminData){}
    public function getAdminPower($adminData){}
}